
<div id="comment<%= comment.id %>" class="blogComment"<%if (comment.collapsed) %>style="display:none"<%end %>>
    <div class="blogUserImage">
        <%= comment.user_image_tag %>
    </div>
    <div class="triangle-right left">
        <table>
            <body>
                <tr>
                    <td>
                        <div id="commentcc" style="width:680px; float:left">
                            <div class="baloon_header">
								<div id="flash_messages_comment_<%= comment.id %>" style="height:20px">
									
								</div>
                                <div class="blogCommentPostedAt">
                                    Inserito il <span class="blogPostDate"><%= comment.created_at %></span>
                                    da <span class="blogPoster"><%= comment.user.link_to_page %></span>
                                </div>
                            </div>
                            <div class="baloon-content">
                                <%= h(comment.contents) %>
                            </div>
                            <div class="baloon-footer">
                                <% if current_user and (is_proprietary? comment or current_user.is_my_proposal? @proposal.id) %>
                                <p>
                                    <%= link_to_remote 'Cancella', {:url => {:action => "adestroy", :controller => "proposal_comments", :proposal_id => @proposal.id, :id => comment.id}},
                                    {:id => "delete#{comment.id}", :href => url_for(:action => "adestroy", :controller => "proposal_comments", :proposal_id => @proposal.id, :id => comment.id)} %>
                                </p>
                                <% end %>
                            </div>
                        </div>
                    </td>
                    <td>
                        <div id="rankingpanelcontainer<%=comment.id%>" style="width:40px; float:left;">
                            <%= render :partial => 'proposal_comments/ranking_panel', :locals => {:comment => comment} %>
                        </div>
                    </td>
                </tr>
            </body>
        </table>
        <script>	
            		var onClick<%=comment.id%> = new Function($('#delete<%= comment.id%>').attr('onClick'));		
            		function nuova() {			
            			if (confirm('Sei sicuro di voler cancellare questo commento?')) {			
            				$('#comment<%= comment.id%>').hide(600,onClick<%=comment.id%>);
            			}
            			return false;		
            		}									
            		$('#delete<%= comment.id%>').removeAttr('onclick').click(nuova);
            		
            		<%if (comment.collapsed) %>
            			$('#comment<%= comment.id%>').show(600);
            	    <%end%>
            		
            		
            	
        </script>
    </div>
</div>
